Skip to content

Build a simple PDF viewer application using PDF4NET.View controls for WPF

  1. Create a new WPF application and open the main window in the XAML designer.

  2. Add a reference to PDF4DEV.Components.PDF4NET.View.NET.Wpf nuget package in your project.

  3. Add a reference to PDF4NET.View controls in the application's window:
    xmlns:pdfView="clr-namespace:O2S.Components.PDF4NET.View;assembly=O2S.Components.PDF4NET.View.NET.Wpf"

  4. Place the PDFDocumentView control in the window's grid:

  5. Add the following code in the window's Loaded event.

  6. Run the application.